import { useUserStore } from '@/stores'
import type { UserInfo } from '@/types/userTypes'

// 获取 token
export function getToken(): string | null {
  return localStorage.getItem('token')
}

// 移除 token
export function removeTokenAndUserInfo() {
  const userStore = useUserStore()
  userStore.setUserInfo({} as UserInfo) 
}
